home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmigaPlus / Demos / fxPAINT_Demo / Install < prev    next >
Encoding:
Text File  |  2003-01-27  |  17.6 KB  |  513 lines

  1. ; IOSPIRIT fxPAINT 2.0 Installation script
  2. ; (C) 1998-2003 by IOSPIRIT Felix Schwarz
  3. ; $VER: 2.0
  4.  
  5. (delopts "force" "askuser" "nofail")
  6.  
  7. (if (= @language "deutsch")
  8.         (
  9.                 ; ----------------------------
  10.                 ; Let`s use German as language
  11.                 ; ----------------------------
  12.                 (set #welcome
  13.                         (cat
  14.                                 "\n\n\n\nfxPAINT 2.0 Demo\n"
  15.                                 "©1998-2003 by Felix Schwarz\n\n\n"
  16.                                 "Willkommen zur fxPAINT Demo Installation!\n"
  17.                                 "Dieses Skript wird fxPAINT Demo auf Ihre HD installieren."
  18.                         )
  19.                 )
  20.  
  21.                 (set #askinstall "Wohin soll fxPAINT Demo installiert werden? (Es wird ein Verzeichnis erstellt)")
  22.                 (set #license "\n\n\n\n\n\nAkzeptieren Sie die Lizenzbedingungen?")
  23.                 (set #onlylicense "\n\n\n\n\nSie müssen die Lizenzbedinugen akzeptieren um diese Software installieren zu können und nutzen zu dürfen.")
  24.                 (set #cputxt "Welchen 68K-Prozessor haben Sie in Ihrem AMIGA ?")
  25.                 (set #cpuhelp "Wenn Sie sich unsicher sind, wählen Sie 68020. Diese Version arbeitet mit allen Systemen.")
  26.                 (set #copylibs "Überprüfe und kopiere benötigte Libraries..")
  27.                 (set #licensefile "Lizenz.txt")
  28.                 (set #useradd "Folgende Zeilen werden zur User-Startup hinzugefügt:\n\n")
  29.                 (set #copyprompt "Kopiere ..")
  30.  
  31.                 (set #oldprompt "Sie sollten fxPAINT nicht über eine alte Version installieren. Die alte Version wird umbenannt.")
  32.  
  33.                 (set #byebye "\n\n\n\n\n\n\nfxPAINT ist nun auf Ihrer Festplatte installiert.")
  34.  
  35.                 (set #nohelp "Leider ist derzeit kein Hilfetext verfügbar.")
  36.  
  37.                 (set #updateinstaller
  38.                         (cat
  39.                                 "Es wurde eine veraltete Version des Installer gefunden.\n"
  40.                                 "Die Version 43.3 kann im Aminet unter\n\n"
  41.                                 "util/misc/Installier-43_3.lha\n\n"
  42.                                 "gefunden werden. Wenn möglich, sollten Sie möglichst bald\n"
  43.                                 "die neue Version installieren, vor allem dann, wenn während\n"
  44.                                 "dieser Installation Probleme auftreten sollten."
  45.                         )
  46.                 )
  47.  
  48.                 (set #updatewarpos
  49.                         (cat
  50.                                 "Auf Ihrer Festplatte ist WarpUP mit der powerpc.library in\n"
  51.                                 "Version 16.1beta1 installiert. Diese Version verursacht auf\n"
  52.                                 "manchen System Stabilitätsprobleme. Installieren Sie in diesem\n"
  53.                                 "Fall bitte wieder die Originalversion 16.1 oder höher\n"
  54.                                 "Zu finden unter\n\n"
  55.                                 "ftp://de.aminet.net/pub/aminet/biz/haage/WarpUP_V51Upd.lha\n\n"
  56.                                 "fxSCAN 4.04 oder höher umgehen den Bug, der zuvor die 16.1beta1\n"
  57.                                 "notwendig gemacht hat.\n"
  58.                         )
  59.                 )
  60.  
  61.                 (set #amithlonpc "Ist dieses System ein AMITHLON-System?")
  62.                 (set #amiuseradd "Folgende Zeilen müssen zur User-Startup hinzugefügt werden, damit die Amithlon-Unterstützung funktioniert:\n\n")
  63.                 (set #amireset   "Sie haben angegeben, dass dies ein Amithlon-System ist. Führen Sie nach Beendigung der Installation bitte einen Neustart des Systems durch.")
  64.  
  65.                 (set #ioerror "Während der Installation ist ein Fehler aufgetreten.\nBitte melden Sie diesen an support@iospirit.de\nVielen Dank.")
  66.  
  67.                 (set #cpunonsupp "Die Demoversion ist nur auf einem System mit 68020 oder besser (auch PPC) läuffähig. Installation fortsetzen?")
  68.         )
  69.         (
  70.                 ; -----------------------------
  71.                 ; Let`s use English as language
  72.                 ; -----------------------------
  73.                 (set #welcome
  74.                         (cat
  75.                                 "\n\n\n\nfxPAINT 2.0\n"
  76.                                 "©1998-2003 by Felix Schwarz\n\n\n"
  77.                                 "Welcome to the fxPAINT installation!\n"
  78.                                 "This script will install fxPAINT on your HD."
  79.                         )
  80.                 )
  81.                 (set #askinstall "Where shall fxPAINT be installed. (A directory will be created)")
  82.                 (set #license "\n\n\n\n\n\nDo you accept the license agreement?")
  83.                 (set #onlylicense "\n\n\n\n\nYou have to accept the license agreement in order to be able to install this software and be allowed to use it.")
  84.                 (set #cputxt "Which 68K-CPU do you have installed in your AMIGA ?")
  85.                 (set #cpuhelp "If you`re not sure, which CPU is installed in your AMIGA, choose the 68000. This version works on all systems.")
  86.                 (set #copylibs "Checking and installing required libraries..")
  87.                 (set #copydocu "Copying fxPAINT-documentation..")
  88.                 (set #licensefile "License.txt")
  89.                 (set #copydocufile "Docs/English/")
  90.                 (set #useradd "The following lines will be added to your user-startup:\n\n")
  91.                 (set #copyprompt "Copying ..")
  92.  
  93.                 (set #oldprompt "You should not install fxPAINT over an old version. The old version will be renamed.")
  94.  
  95.                 (set #byebye "\n\n\n\n\n\n\n\nfxPAINT is now installed on your HD.")
  96.  
  97.                 (set #nohelp "Sorry. No help text available at this point.")
  98.  
  99.                 (set #updateinstaller
  100.                         (cat
  101.                                 "An obsolete version of Installer has been found.\n"
  102.                                 "Version 43.3 can be found on Aminet at\n\n"
  103.                                 "util/misc/Installier-43_3.lha\n\n"
  104.                                 "gefunden werden. If possible, please update soon\n"
  105.                                 "to the newer version, especially if you encounter\n"
  106.                                 "any problems during installation."
  107.                         )
  108.                 )
  109.  
  110.                 (set #updatewarpos
  111.                         (cat
  112.                                 "You have WarpUP with powerpc.library in version 16.1beta1\n"
  113.                                 "installed on your harddisk. This version can cause stability\n"
  114.                                 "problems on some systems. In this case please reinstall the\n"
  115.                                 "original version 16.1 or higher again, as can be found at\n\n"
  116.                                 "ftp://de.aminet.net/pub/aminet/biz/haage/WarpUP_V51Upd.lha\n\n"
  117.                                 "fxSCAN 4.04 or higher now also work around the bug that made the\n"
  118.                                 "use of 16.1beta1 necessary."
  119.                         )
  120.                 )
  121.  
  122.                 (set #amiuseradd "The following lines have to be added to the user-startup for Amithlon-support to work:\n\n")
  123.                 (set #amithlonpc "Is this system an AMITHLON-system?")
  124.                 (set #amireset   "You have selected that this is an Amithlon-system. Please reset your computer after this installation is done.")
  125.  
  126.                 (set #ioerror "During installation an error occured.\nPlease report it to support@iospirit.de\nThank you.")
  127.  
  128.                 (set #cpunonsupp "The demo version only runs on a system with 68020 or better (incl. PPC). Continue?")
  129.         )
  130. )
  131.  
  132. ; ---------------------
  133. ; New: error handler :)
  134. ; ---------------------
  135.  
  136. (onerror
  137.         (
  138.                 (if (> @ioerr 0)
  139.                         (message
  140.                                 (cat #ioerror "\n\nInstaller error code: " @ioerr)
  141.                         )
  142.                 )
  143.         )
  144. )
  145.  
  146. ;-----------------------------
  147. ; New: Check installer version
  148. ;-----------------------------
  149. (set #instver 0)
  150. (set #currinst "43.3")
  151.  
  152. (set #biginst @installer-version)
  153.  
  154. (set #iver (/ #biginst 65536))
  155. (set #irev (- #biginst (* #iver 65536)))
  156.  
  157. (set #instver (cat #iver "." #irev))
  158.  
  159. (if (< #instver #currinst)
  160.         (
  161.                 (message #updateinstaller)
  162.         )
  163. )
  164.  
  165. ; --------------------------------------
  166. ; Ok, let`s begin with a small greeting!
  167. ; --------------------------------------
  168.  
  169. (message #welcome)
  170.  
  171. (welcome)
  172.  
  173. ; --------------------------------------------
  174. ; Present license file and wait for user input
  175. ; --------------------------------------------
  176.  
  177. (run (cat "C:run sys:Utilities/Multiview " #licensefile))
  178.  
  179. (set #licenseok
  180.         (askbool
  181.                 (prompt #license)
  182.                 (help #license)
  183.                 (default 0)
  184.         )
  185. )
  186.  
  187. (if (<= #licenseok 0)
  188.         (
  189.                 (message #onlylicense)
  190.                 (set @default-dest "nowhere")
  191.                 (exit)
  192.         )
  193. )
  194.  
  195. ; -------------------------------------
  196. ; Set destination-directory for fxPAINT
  197. ; -------------------------------------
  198. (set #installdir
  199.         (askdir
  200.                 (prompt #askinstall)
  201.                 (help @askdir-help)
  202.                 (default @default-dest)
  203.         )
  204. )
  205.  
  206. ; ------------------------------
  207. ; Set CPU installed in the AMIGA
  208. ; ------------------------------
  209. (set #cpu 0)
  210. (set #cpu2 (database "cpu"))
  211.  
  212. (if (< #cpu2 68020)
  213.         (
  214.                 (message #cpunonsupp)
  215.         )
  216. )
  217.  
  218. ; ---------------------------------------
  219. ; Also use the FPU installed in the AMIGA
  220. ; ---------------------------------------
  221.  
  222. (set #fpu (database "fpu"))
  223. (if (not (patmatch "NOFPU" #fpu)) (set #cpu (+ #cpu 1)))
  224.  
  225. ; -----------------------------------------
  226. ; Let the user verify the detection results
  227. ; -----------------------------------------
  228.  
  229. (set #amithlon 0)
  230. (set #morphos 0)
  231.  
  232. (set #cpuvers
  233.         (askchoice
  234.                 (choices "68020-060" "68020-060 + FPU" "MorphOS" "AOS 4" "Amithlon")
  235.                 (prompt #cputxt)
  236.                 (help   #cpuhelp)
  237.                 (default #cpu)
  238.         )
  239. )
  240.  
  241. ; 020-060
  242. (if (= #cpuvers 0)
  243.         (
  244.                 (set #maincpusrc "InstallData/CPU/020/")
  245.         )
  246. )
  247.  
  248. ; 020-060 + FPU
  249. (if (= #cpuvers 1)
  250.         (
  251.                 (set #maincpusrc "InstallData/CPU/020FPU/")
  252.         )
  253. )
  254.  
  255. ; MorphOS
  256. (if (= #cpuvers 2)
  257.         (
  258.                 (set #maincpusrc "InstallData/CPU/020FPU/")
  259.                 (set #morphos 1)
  260.         )
  261. )
  262.  
  263. ; OS 4
  264. (if (= #cpuvers 3)
  265.         (
  266.                 (set #maincpusrc "InstallData/CPU/020/")
  267.         )
  268. )
  269.  
  270. ; Amithlon
  271. (if (= #cpuvers 4)
  272.         (
  273.                 (set #maincpusrc "InstallData/CPU/020FPU/")
  274.                 (set #amithlon 1)
  275.         )
  276. )
  277.  
  278. ; -----------------------
  279. ; Check for older install
  280. ; -----------------------
  281. (set #oldinst
  282.         (tackon #installdir "fxPAINT")
  283. )
  284.  
  285. (set #oldinstinfo
  286.         (tackon #installdir "fxPAINT.info")
  287. )
  288.  
  289. (if (exists #oldinst (noreq))
  290.         (
  291.                 (set #rensucc 0)
  292.                 (set #rencnt  1)
  293.  
  294.                 (while (= #rensucc 0)
  295.  
  296.                         (
  297.                                 (set #oldoldinst
  298.                                         (tackon #installdir (cat "fxPAINT_old_" #rencnt))
  299.                                 )
  300.  
  301.                                 (set #oldoldinstinfo
  302.                                         (tackon #installdir (cat "fxPAINT_old_" #rencnt ".info"))
  303.                                 )
  304.  
  305.                                 (if     (rename #oldinst #oldoldinst
  306.                                                 (prompt #oldprompt)
  307.                                                 (help #oldprompt)
  308.                                         )
  309.  
  310.                                         (
  311.                                                 (set #rensucc 1)
  312.  
  313.                                                 (rename #oldinstinfo #oldoldinstinfo
  314.                                                         (prompt #oldprompt)
  315.                                                         (help #oldprompt)
  316.                                                 )
  317.                                         )
  318.                                         (
  319.                                                 (set #rencnt (+ 1 #rencnt))
  320.                                         )
  321.                                 )
  322.                         )
  323.                 )
  324.         )
  325. )
  326.  
  327. ; ----------------
  328. ; Copy basic files
  329. ; ----------------
  330. (copyfiles
  331.         (prompt #copyprompt)
  332.         (help #nohelp)
  333.         (source "InstallData/main_dir/")
  334.         (dest #installdir)
  335.         (pattern "#?")
  336. )
  337.  
  338. ;-------------------------------
  339. ; Copy new fxWARP 3 system files
  340. ;-------------------------------
  341.  
  342. (if (= #amithlon 0)
  343.         (
  344.                 (if (= #morphos 0)
  345.                         (
  346.                                 (copyfiles
  347.                                         (prompt #copyprompt)
  348.                                         (help #nohelp)
  349.                                         (source "InstallData/Libs/")
  350.                                         (dest "LIBS:")
  351.                                         (pattern "fxWARP3#?")
  352.                                 )
  353.  
  354.                                 (copyfiles
  355.                                         (prompt #copyprompt)
  356.                                         (help #nohelp)
  357.                                         (source "InstallData/C/")
  358.                                         (dest "C:")
  359.                                         (pattern "fxWARP#?")
  360.                                 )
  361.                         )
  362.                 )
  363.         )
  364. )
  365.  
  366. ; ----------------
  367. ; Copy CPU version
  368. ; ----------------
  369. (set #maincpudest
  370.         (tackon #installdir "fxPAINT/")
  371. )
  372.  
  373. (copyfiles
  374.         (prompt #copyprompt)
  375.         (help #nohelp)
  376.         (source #maincpusrc)
  377.         (dest #maincpudest)
  378.         (pattern "#?")
  379. )
  380.  
  381. ; ------------------------------
  382. ; Add some lines to user-startup
  383. ; ------------------------------
  384. (set #thewholepath
  385.         (tackon #installdir "fxPAINT")
  386. )
  387.  
  388. ; -- Commented out as not too useful for the demo
  389. ;(set #startupadditions
  390. ;        ("Assign fxPAINT: REMOVE\nAssign fxPAINT: \"%s\"" #thewholepath)
  391. ;)
  392.  
  393. ;(startup "IOSPIRIT fxPAINT"
  394. ;        (prompt #useradd
  395. ;                #startupadditions)
  396. ;        (help #nohelp)
  397. ;        (command #startupadditions)
  398. ;)
  399.  
  400. ; ----------------------------------------------
  401. ; Add assign now, so user can use it immediately
  402. ; ----------------------------------------------
  403.  
  404. (makeassign "fxPAINT" #thewholepath)
  405.  
  406. ;-----------------------------------
  407. ; New: Check powerpc.library version
  408. ;-----------------------------------
  409.  
  410. (set #powerpcsize
  411.         (getsize "LIBS:powerpc.library")
  412. )
  413.  
  414. (if (= #powerpcsize 111252)
  415.         (
  416.                 (message #updatewarpos)
  417.         )
  418. )
  419.  
  420. ;--------------------------------------------------
  421. ; Amithlon support installation routines
  422. ;--------------------------------------------------
  423.  
  424. (if (= #amithlon 1)
  425.         (
  426.                 ;--------------------------------
  427.                 ; Add run_elf patch to the system
  428.                 ;--------------------------------
  429.  
  430.                 ; Rename old/wrong positioned run_elf
  431.                 (if (exists "C:run_elf")
  432.                         (
  433.                                 (run "rename C:run_elf   C:run_elf_wrongdir"
  434.                                         (prompt #workprompt)
  435.                                         (help   #nohelp)
  436.                                 )
  437.                         )
  438.                 )
  439.  
  440.                 (if (exists "C:run_elf86")
  441.                         (
  442.                                 (run "rename C:run_elf86 C:run_elf86_wrongdir"
  443.                                         (prompt #workprompt)
  444.                                         (help   #nohelp)
  445.                                 )
  446.                         )
  447.                 )
  448.  
  449.                 ; Detect version and make sure we don't overwrite a newer version
  450.                 (set #install_runelf 0)
  451.  
  452.                 (if (exists "C:AmithlonC/run_elf")
  453.                         (
  454.  
  455.                                 (set #runelfver 0)
  456.                                 (set #currrunelf "1.7")
  457.  
  458.                                 (set #bigrunelf (getversion "C:AmithlonC/run_elf"))
  459.  
  460.                                 (set #rever (/ #bigrunelf 65536))
  461.                                 (set #rerev (- #bigrunelf (* #rever 65536)))
  462.  
  463.                                 (set #runelfver (cat #rever "." #rerev))
  464.  
  465.                                 (if (< #runelfver #currrunelf)
  466.                                         (
  467.                                                 (set #install_runelf 1)
  468.                                         )
  469.                                 )
  470.                         )
  471.                 )
  472.  
  473.                 (if (not (exists "C:AmithlonC/run_elf" (noreq)))
  474.                         (
  475.                                 (set #install_runelf 1)
  476.                         )
  477.                 )
  478.  
  479.                 (if (= #install_runelf 1)
  480.                         (
  481.                                 (copyfiles
  482.                                         (prompt #copyprompt)
  483.                                         (help #nohelp)
  484.                                         (source "InstallData/Amithlon/run_elf-1.7/")
  485.                                         (dest "C:AmithlonC/")
  486.                                         (pattern "run_elf#?")
  487.                                 )
  488.                         )
  489.                 )
  490.  
  491.                 (set #startupadditions "run <>NIL: C:AmithlonC/run_elf PATCH")
  492.  
  493.                 (startup "run_elf"
  494.                         (prompt #amiuseradd
  495.                                 #startupadditions)
  496.                         (help #nohelp)
  497.                         (command #startupadditions)
  498.                 )
  499.  
  500.                 (message #amireset)
  501.         )
  502. )
  503.  
  504. ; -------------------------
  505. ; Say Bye-Bye and Thank-You
  506. ; -------------------------
  507.  
  508. (message #byebye)
  509.  
  510. (set @default-dest #thewholepath)
  511. (exit)
  512.  
  513.